This application is based on Application Ser. No. 2000-81928 filed in Japan, the content of which is hereby incorporated by reference.
1. Field of the Invention
The present invention relates to image processing apparatuses, image pickup apparatuses and image processing methods and, more particularly to an image processing apparatus, image pickup apparatus, and image processing method capable of eliminating an effect of outside light such as light from an interior lamp.
2. Description of the Related Art
Conventionally, image pickup apparatuses such a scanner has been known in which light is directed to a manuscript placed on a base and an image of the manuscript is taken by reading a reflection of the directed light. Such an image pickup apparatus suffers from a problem that the manuscript is illuminated with a light other than that of an illumination lamp in the apparatus, e.g., interior lamp. Thus, the image of the manuscript is affected by outside light such as light from the interior lamp. If such outside light is uneven and a shadow is projected because of an obstacle or the like, in particular, a somewhat strange image is taken which deviates from a desired image.
FIGS. 22A and 22B are diagrams shown in conjunction with projection of shadows onto the manuscript due to an interior lamp. FIG. 22A relates to the case where an image of a manuscript 70 placed on a base is read by an optical head 1 including, for example, a CCD (Charge Coupled Device), when an illumination lamp 2 is off. FIG. 22B relates to the case where the image of manuscript 70 is read when illumination lamp 2 is on. Note that an interior lamp 3 is on in either case.
Referring to FIG. 22A, when illumination lamp 2 is off, manuscript 70 is illuminated only with light from interior lamp 3. Since the light from interior lamp 3 is shielded by obstacle 4, a shadow is projected to manuscript 70. Thus, there is an illuminance difference between a shadow portion and a portion free from shadow over manuscript 70. Accordingly, the image read by optical head 1 is subjected to the effect of shadow because of the illuminance difference over the manuscript. Note that, for the shadow portion, an illumination light amount would not be 0 because of scattered light from outside.
Referring to FIG. 22B, when illumination lamp 2 is on, manuscript 70 placed on the base is illuminated with uniform light from illumination lamp 2 in addition to light from interior lamp 3. Accordingly, although manuscript 70 receives a greater amount of light, there still exists an illuminance difference over the manuscript between the shadow portion caused by interior lamp 3 and the portion free from shadow as in the case of FIG. 22A.
FIG. 23 is a graph showing illuminances of manuscript 70 when illumination lamp 2 in the apparatus is on and off. A solid line {circle around (1)} shows an illuminance over manuscript 70 in the case of FIG. 22A, that is, in the case where only interior lamp is directed to the manuscript when illumination lamp 2 is off. The shadow region on the left side of the manuscript has lower illuminance than the region free from shadow on the right side. Thus, there is an illuminance difference between the shadow portion and the portion free from shadow.
A solid line {circle around (2)} shows an illuminance over manuscript 70 in the case of FIG. 22B, that is, in the case where the interior lamp and the light from the illumination lamp are both directed to the manuscript when illumination lamp 2 is on. As compared with {circle around (1)}, the illuminance over the manuscript is higher over the entire region by a given amount of light from the illumination lamp. Thus, as in the case where the illumination lamp is off, there still exists an illuminance difference between the shadow region and the region free from shadow.
Accordingly, if the image of the manuscript is read when the illumination lamp is on, i.e., under a general image taking condition, the taken image is affected by the illuminance difference between the shadow region and the region free from shadow as indicated by {circle around (2)}. The illuminance difference causes brightness difference over the manuscript.
To eliminate the effect of the shadow caused by the interior lamp or the like, the image when the illumination lamp is off (the image in the case of only interior lamp) i.e., the image that is affected by a shadow or the like may be subtracted from the image when the illumination lamp in the apparatus is on. Namely, the image of the manuscript in the case of FIG. 22A is subtracted from that in the case of FIG. 22B.
An object of the present invention is to provide an image processing apparatus, image pickup apparatus, and image processing method capable of eliminating the effect of outside light caused to a taken image.
Another object of the present invention is to provide an image processing apparatus, image pickup apparatus, and image processing method capable of appropriately correcting any displacement caused to the taken image to eliminate the effect of outside light.
The above objects of the present invention is achieved by providing the image processing apparatus with the following elements. More specifically, according to one aspect of the present invention, an image processing apparatus includes: a first receiving portion receiving a first image of an object taken under a prescribed illuminating condition; a second receiving portion receiving a second image of the object taken under an illuminating condition different from the prescribed illuminating condition; and an eliminating portion eliminating an effect of outside light using the received first and second images. The eliminating portion includes: an adjusting portion adjusting at least one of the first and second images to equalize brightness differences of the first and second images; and a calculating portion calculating a difference between the first and second images that have been adjusted by the adjusting portion to have the same brightness difference.
According to the present invention, at least one of the first and second images taken under different illuminating conditions is adjusted to equalize the brightness differences of the first and second images. After the brightness differences of the images are equalized, a difference between these two images is calculated. Thus, purely the effect of outside light can be eliminated using the first and second images that have been affected by the same outside light.
Accordingly, an image processing apparatus capable of eliminating the effect of outside light caused to the taken image can be provided.
Preferably, the brightness difference adjusted by the adjusting portion is caused by a difference between amounts respectively for said first and second receiving portions when the first and second images are taken.
As such, the brightness difference caused by a difference in exposure amount when the first and second images are taken is eliminated. Thus, even if the images are subjected to different exposure lamps by automatic exposure, for example, such brightness difference is properly adjusted to eliminate the effect of a shadow or the like caused by the outside light.
Preferably, the image processing apparatus is characterized in that it further includes: a first exposure amount receiving portion receiving an exposure amount when the first image is taken; and a second exposure amount receiving portion receiving an exposure amount when the second image is taken. The adjusting portion performs adjustment to equalize the brightness differences of the images based on the exposure amounts respectively received by the first and second exposure amount receiving portions.
Thus, the exposure amounts when the first and second images are taken are received, based on which the images are adjusted. Accordingly, the brightness differences of the first and second images can be precisely and readily equalized.
Preferably, the image processing apparatus is characterized in that it further includes: a first brightness difference receiving portion receiving a brightness difference between a maximum brightness portion having the highest brightness and a minimum brightness portion having the lowest brightness of the first image; and a second brightness difference receiving portion receiving a brightness difference between a maximum brightness portion having the highest brightness and a minimum brightness portion having the lowest brightness of the second mage. The adjusting portion equalizes the brightness differences of the images based on the brightness differences respectively received by the first and second brightness difference receiving portions.
Thus, the brightness differences of the first and second images can be equalized based on the brightness differences of the maximum and minimum brightness portions of the first and second images. Thus, even if the exposure amount during image pickup is unknown, the brightness difference over each image can be eliminated based on the taken image.
More preferably, in the image processing apparatus, the maximum and minimum brightness portions, respectively having the maximum and minimum brightnesses, of the first and second image data refer to regions of the first and second images excluding the regions of object.
Thus, the brightness difference between the maximum and minimum brightness portions can be obtained from the image region excluding the region of the taken image, such as the regions of a base or reflector in each image. Accordingly, a desired brightness difference can be easily obtained.
Preferably, in the image processing apparatus, the maximum and minimum brightness portions, respectively having the maximum and minimum brightnesses, of the first and second image data refer to regions of the object of the first and second images.
Thus, the brightness difference between the maximum and minimum brightness portions can be obtained from the region of the object such as the manuscript. Accordingly, even if the taken image includes only the image of the object, a desired brightness difference can be obtained.
Preferably, the image processing apparatus further includes: an extracting portion extracting an edge area from at least one of the first and second images; and a controlling portion controlling to eliminate the effect of outside light by an eliminating portion for a region other than the extracted edge area and to eliminate the effect of outside light based on the elimination result of the outside light for the region other than the edge region for the extracted area.
Accordingly, the edge area is extracted from at least one of the first and second images. For the region other than the edge area, the effect of the outside light is eliminated by the eliminating portion. For the edge area, the effect of outside light is eliminated based on a correction result of the region other than the edge area where the effect of outside light has been eliminated.
Thus, also for the edge area which is subjected to a significant effect of image displacement due to shaking, the correcting process result of the region other than the edge area subjected to less effect is utilized to appropriately eliminate the effect of outside light.
Thus, an image processing apparatus can be provided which can appropriately correct to eliminate the effect of the outside light even if the taken image is displaced.
Preferably, the controlling portion includes an identifying portion identifying a proximity pixel of the region other than the edge area that corresponds to a target pixel in the extracted edge area. The controlling portion eliminates the effect of outside light of the target pixel based on the identified pixel value for which the effect of outside light has been eliminated.
Accordingly, a proximity pixel of the region other than the edge area that corresponds to the target pixel in the edge area is identified. The effect of outside light is eliminated by the eliminating portion for the identified proximity pixel, so that the effect of outside light of the target pixel is eliminated based on the result.
Since the result of the proximity pixel is used which is subjected to the effect of outside light in the closest manner as the target pixel is used, the effect of outside light can be more appropriately eliminated.
Preferably, the extracting portion is characterized in that it extracts the edge area from one of the first and second images with a maximum possible margin caused by shaking.
Preferably, the extracting portion is characterized in that it extracts a region determined as an edge area from at least one of the first and second images.
According to the present invention, the edge area extracted by the extracting portion has an area obtained by properly extending the actual edge area. Accordingly, even if displacement is caused to some extent due to shaking when the image is taken, the effect can be eliminated.
According to another aspect of the present invention, the image pickup apparatus is provided with an image processing apparatus that includes: an illuminating portion illuminating an object with light; an image pickup portion taking an image of the object; a first receiving portion receiving a first image of the object taken under a prescribed illuminating condition; a second receiving portion receiving a second image of the object taken under an illuminating condition different from a prescribed illuminating condition; and an eliminating portion eliminating an effect of outside light using the received first and second images. The eliminating portion includes: an adjusting portion adjusting at least one of the first and second images to equalize brightness differences of the first and second images; and a calculating portion calculating a difference between the first and second images that have been adjusted by the adjusting portion to have the same brightness difference. The first and second images are taken by the image pickup portion under different illuminating conditions of the illuminating portion.
Preferably, the image processing apparatus further includes: an extracting portion extracting an edge area from at least one of the first and second images; and a controlling portion controlling to eliminate the effect of outside light by the eliminating portion for a region other than the extracted edge area and to eliminate the effect of outside light based on the elimination result of the outside light for the region other than the edge region for the extracted edge area.
According to the present invention, the first and second images are taken by the image pickup portion under different illuminating conditions of the illuminating portion. At least one of the images is adjusted to equalize the brightness differences of these two images and, after the images come to have the same brightness difference, a difference between these two images is calculated. Thus, only the effect of outside light can be purely eliminated using the first and second images that have been subjected to the effect of the same outside light.
Thus, an image pickup apparatus can be provided which can eliminate the effect of outside light caused to the taken image.
According to a still another aspect of the present invention, an image processing method includes steps of: illuminating an object under a first illuminating condition to receive a first image of the object under a first receiving condition; illuminating the object under a second illuminating condition to receive a second image of the object under a second receiving condition. The second illuminating condition and the second receiving condition are respectively different from the first illuminating condition and the first receiving condition. The image processing method further includes steps of: modifying first image data and/or second image data to eliminate a difference between effects respectively caused to the first and second images under the first and second receiving conditions; and detecting a difference between the first and second images that have been modified by the modifying step.
According to the present invention, at least one of the first and second images taken under different illuminating conditions is modified to eliminate a difference between the effects caused to these images. After the difference between the effects caused to these images is eliminated, a difference between these two images is detected. Thus, by using the first and second images that have been subjected to effects of the same outside light, only the effect of outside light can be purely eliminated.
Accordingly, an image processing method can be provided which can eliminate the effect of outside light caused to the taken image.
Preferably, one of the first and second illuminating conditions refers to a condition of more intensively applying light than the other, and a factor common to the first and second illuminating conditions is eliminated based on the detected difference.
Thus, the difference between two images is detected after the difference between the effects caused to the first and second images is eliminated, so that the factor common to the first and second illuminating conditions is eliminated and only a light amount differing between the first and second illuminating conditions can be detected as a difference.
Preferably, the method further includes steps of: extracting an edge area from at least one of the first and second images; and modifying the extracted edge area based on the detected difference.
Thus, the edge area is extracted from at least one of the first and second images and the effect of outside light is eliminated based on the detected difference of the region other than the edge area from which the effect of outside light has been eliminated.
Accordingly, also for the edge area which is subjected to a significant effect of displacement of image due to shaking, by utilizing the detected difference of the region other than the edge region which is subjected to less effect the effect of outside light can be appropriately eliminated.
Thus, an imaging method can be provided which can appropriately perform correction for eliminating the effect of outside light even if there is displacement in the taken image.
Preferably, the receiving condition refers to a product of a shutter releasing time and an aperture opening area.
Each of the first and second receiving conditions refers to a product of the shutter releasing time and aperture opening area, so that these receiving conditions can be readily obtained.
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.